package com.lai.shop.controller;


import com.lai.shop.service.ThirdPartyService;
import com.lai.shop.utils.R;
import com.lai.shop.vo.VerificationCodeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * 第三方服务controller
 */
@RestController
@RequestMapping("/thirdParty")
public class ThirdPartyController {


    @Autowired
    ThirdPartyService thirdPartyService;


    @RequestMapping("/oss/policy")
    public R policy() {
        Map<String, String> resp = thirdPartyService.ossPolicy();
        return R.ok().put("data", resp);
    }

    @PostMapping("/sms/sendVerificationCode")
    public R sendVerificationCode(@RequestBody VerificationCodeVo verificationCodeVo) throws Exception {
        thirdPartyService.sendVerificationCode(verificationCodeVo);
        return R.ok();
    }


}
